{extend name="template/base"/}
{block name="content"}
<!--今日上新-->
<div class="n_box cf" id="goods_list">
    <ul class="n_ul">
        <!--ajax往这插-->
    </ul>
</div>
<!--今日上新end-->
<!--翻页-->
<div class="pag">
    <span class="p_prev">上一页</span>
    <a class="on" href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=1">1</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=2">2</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=3">3</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=4">4</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=5">5</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=6">6</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=7">7</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=8">8</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=9">9</a>
    <a href="{:\\think\\Url::build('Cate/index')}?keyword={$keyword}&page=10">10</a>
    <a class="p_next" href="">下一页</a>
</div>
<!--翻页end-->
{/block}
{block name="style"}
{/block}
{block name="script"}}
<script type="text/javascript">
    $(document).ready(function () {
        $.post("{:\\think\\Url::build('Cate/getClassGoodsInfo')}",
            {
                keyword: "{$keyword}",
                page: "{$page}"
            },
            function (obj) {
                for (var i = 0; i < obj.length; i++) {
                    if (obj[i]['state'] != 0) {
                        var other = '<li class="goods_li"><em class="ico_td ico_td2">今日<br>新品</em><table width="310" height="310" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td><a target="_blank" href="' + obj[i][0]['url'] + '"><img title="' + obj[i][0]['name'] + '" src="' + obj[i][0]['imagePath'] + '"></a></td></tr></tbody></table><div class="n_tex cf"><div class="sy-text"><div class="fr"><img src="__IMG__/jd/jd.ico" style="width: 12px;"> 京东</div><a class="good_title" target="_blank" href="{:\\think\\Url::build(\'Detail/index\').\'?id=\'}' + obj[i][0]['skuId'] + '" title="' + obj[i][0]['name'] + '">' + obj[i][0]['name'] + '</a></div><span class="r_d1"><!--<a href="' + obj[i][0]['url'] + '" target="_blank" class="ico-zyhq"></a>--><em></em><p>￥<i>' + obj[i]['price'] + '</i></p></span><span class="r_d2"><em class="no_ctp"></em><span class="r_d3"><em class="price">￥' + obj[i]['market_price'] + '</em><em>节省￥' + (obj[i]['market_price'] - obj[i]['price']) + '</em></span></span></div></li>';
                        $(".n_ul").append(other);
                    }
                }
            });
    });
</script>
{/block}
